
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[FK_EBAS_STUDERENDE_EBAS_IDENTIFIKATION]') and OBJECTPROPERTY(id, N'IsForeignKey') = 1)
ALTER TABLE [dbo].[EBAS_STUDERENDE] DROP CONSTRAINT FK_EBAS_STUDERENDE_EBAS_IDENTIFIKATION
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[EBAS_IDENTIFIKATION]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[EBAS_IDENTIFIKATION]
GO

CREATE TABLE [dbo].[EBAS_IDENTIFIKATION] (
	[GUID] [uniqueidentifier] ROWGUIDCOL NOT NULL ,
	[IDENTIFIKATION] [varchar] (255) COLLATE Danish_Norwegian_CI_AS NOT NULL 
) ON [PRIMARY]
GO

ALTER TABLE [dbo].[EBAS_IDENTIFIKATION] WITH NOCHECK ADD 
	CONSTRAINT [PK_IDENTIFIKATION] PRIMARY KEY  CLUSTERED 
	(
		[GUID]
	)  ON [PRIMARY] 
GO

INSERT INTO EBAS_IDENTIFIKATION (GUID, IDENTIFIKATION) VALUES (NEWID(), 'Certificate')
INSERT INTO EBAS_IDENTIFIKATION (GUID, IDENTIFIKATION) VALUES (NEWID(), 'Diploma')
INSERT INTO EBAS_IDENTIFIKATION (GUID, IDENTIFIKATION) VALUES (NEWID(), 'MBA')
GO
